package com.mondo.financialwallet.presentation.ui.activity;

import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.view.View;
import android.widget.TextView;

import com.example.common.ui.AbsNetworkStateActivity;
import com.example.common.ui.BaseActivity;
import com.mondo.financialwallet.BuildConfig;
import com.mondo.financialwallet.R;
import com.mondo.financialwallet.data.DataRepository;
import com.mondo.financialwallet.data.DataSource;
import com.mondo.financialwallet.data.entity.UserInfoEntity;
import com.mondo.financialwallet.presentation.utils.ActivityTitleBarHelper;
import com.mondo.financialwallet.presentation.utils.GlideImageLoader;
import com.mondo.financialwallet.presentation.utils.LocalConfigStorage;
import com.youth.banner.Banner;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

import butterknife.Bind;

/**
 * 关于我们
 */
public class AboutUsActivity extends BaseActivity {

    public static void launch(Context context) {
        context.startActivity(new Intent(context, AboutUsActivity.class));
    }


    @Bind(R.id.version_text_view) TextView mVersionTextView;
    @Bind(R.id.service_agreement_layout) View mServiceAgreementLayout;
    @Bind(R.id.investment_agreement_layout) View mInvestmentAgreementLayout;

    @Override
    protected void setStatusBar() {
        ActivityTitleBarHelper.setWhiteDarkColorStatus(this);
    }

    @Override
    protected int getBackgroundColor() {
        return Color.WHITE;
    }

    @Override
    protected int getLayoutID() {
        return R.layout.activity_about_us;
    }

    @Override
    protected void initActions() {
        ActivityTitleBarHelper.init(this, null);

        // 当前版本
        mVersionTextView.setText("v"+ BuildConfig.VERSION_NAME);

        // 服务协议
        mServiceAgreementLayout.setOnClickListener(v ->
                WebViewActivity.serviceAgreement(this));

        // 投资协议
        mInvestmentAgreementLayout.setOnClickListener(v ->
                WebViewActivity.assetAgreement(this));
    }
}
